#!/usr/bin/python
# -*- coding: UTF-8 -*- 
 
import re
print(re.search('www', 'www.runoob.com').span())  # 在起始位置匹配
print(re.search('www.runoob.com','com' ))         # 不在起始位置匹配


print(re.search('www.runoob.com','com' ))         # 不在起始位置匹配

datai = r'1072509720" class="course_link">'
class_id = datai[:8]
print(class_id)
searchObj = re.search( r'^\d*', datai, re.M|re.I)

if searchObj:
    print("searchObj.group() : ", searchObj.group(),len(searchObj.group()))
    # print("searchObj.group(1) : ", searchObj.group(1)) 